package com.ict.sdk;

import com.ict.sdk.properties.MyProperties;
import com.ict.sdk.template.MyTemplate;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@EnableConfigurationProperties({
        MyProperties.class
})
public class MyAutoConfiguration {


    @Bean
    @ConditionalOnProperty(prefix = "my.sdk",value = "enable", havingValue = "true")
    public MyTemplate myTemplate(MyProperties myProperties){
        return new MyTemplate(myProperties);
    }

}
